/* Layout */
import Layout from "@/views/layout/Layout";
/*  ------------- demo  ------------- */
// const demoTest = (r) =>
//   require.ensure([], () => r(require("@/views/demo/aTest")), "DemoTest");
const cvTest = (r) => 
  require.ensure([], () => r(require("@/views/CV-test/tabs")), "CVTest");
const CvTestHistory = (r) => 
  require.ensure([], () => r(require("@/views/CV-test/history")), "CVTest");
const CvTestDetail = (r) => 
  require.ensure([], () => r(require("@/views/CV-test/detail")), "CVTest");

/*  ------------- 操作说明  ------------- */
// const homeDetail = (r) =>
//   require.ensure(
//     [],
//     () => r(require("@/views/layout/components/detail")),
//     "setting"
//   );
/*  ------------- 全部历史记录  ------------- */
const historyAllDetail = (r) =>
  require.ensure([], () => r(require("@/views/history-all")), "setting");

/*  ------------- 图形配置详情  ------------- */
const graphConfigDetail = (r) =>
  require.ensure([], () => r(require("@/views/graph-config")), "graphConfig");

const routerList = [
  // 操作说明
  // {
  //   path: "/home",
  //   reactive: "/homeDetail",
  //   component: Layout,
  //   name: "HOME",
  //   meta: {
  //     title: "page.explain",
  //   },
  //   children: [
  //     {
  //       path: "/homeDetail",
  //       name: "HOMEDETAIL",
  //       component: homeDetail,
  //     },
  //     {
  //       path: "/robot",
  //       name: "Robot",
  //       component: () => import("@/views/robot-page/index.vue"),
  //     },
  //   ],
  // },
  // 全部历史记录
  {
    path: "/historyAll",
    redirect: "/historyAll/historyAllDetail",
    component: Layout,
    name: "HistoryAll",
    meta: {
      title: "page.allHistory",
    },
    children: [
      {
        path: "/historyAll/historyAllDetail",
        name: "HistoryAllDetail",
        component: historyAllDetail,
      },
    ],
  },
  // 全部历史记录
  {
    path: "/graph",
    redirect: "/graph/config",
    component: Layout,
    name: "Graph",
    meta: {
      title: "page.graphConfig",
    },
    children: [
      {
        path: "/graph/config",
        name: "GraphConfig",
        component: graphConfigDetail,
        meta: {
          title: "page.detial",
        }
      },
    ],
  },
  {
    path: "/cvTest ",
    component: Layout,
    sort: 31,
    name: "CvTest",
    meta: {
      title: "page.cvTest",
      icon: "setting",
    },
    children: [
      {
        path: "/CvTestOne",
        component: cvTest,
        name: "CvTestOne",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/CvTestHistory",
        component: CvTestHistory,
        name: "CvTestHistory",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WeSPROneDetailCv",
        component: CvTestDetail,
        name: "CvTestDetail",
        hidden: true,
        meta: {
          title: "page.history",
        },
      },
    ],
  },
  // demo
  // {
  //   path: "/qieowq ",
  //   component: Layout,
  //   sort: 3,
  //   name: "qieowq",
  //   meta: {
  //     title: "page.demo",
  //     icon: "setting",
  //   },
  //   children: [
  //     {
  //       path: "/demoTest",
  //       component: demoTest,
  //       name: "demoTest",
  //       meta: {
  //         title: "page.upload",
  //       },
  //     },
  //   ],
  // },
];

export default routerList;
